import axios from "axios";

const http = axios.create({
    baseURL:'http://localhost:8080',
    timeout: 5000
})

http.interceptors.request.use(
    config => {
        console.log('request',config)
        // config.headers['Authorization'] = 'Bearer your-token';
        return config;
    },
    error => {
        console.log('error',error)
        Promise.reject(error)
    }
)

http.interceptors.response.use(
    response => {
        console.log('response',response)
        return response
    },
    error => {
        console.log('error',error)
        Promise.reject(error)
    }
)

export default http